package cn.com.server.entity;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * <p>
 * 终端表
 * </p>
 *
 * @author qing
 * @since 2017-11-20
 */
public class Terminal implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	private Long id;
    /**
     * 终端用户id
     */
	private Long userId;
    /**
     * 终端用户登录账户(唯一)
     */
	private String userName;
    /**
     * usb key信息(比如编号)
     */
	private String usbKey;
    /**
     * 名称
     */
	private String name;
    /**
     * 终端ip地址
     */
	private String ip;
    /**
     * 终端mac
     */
	private String mac;
    /**
     * 在线状态,1在线，0离线
     */
	private Integer online;
    /**
     * 刷新时间
     */
	private Date refreshTime;
    /**
     * 状态，1正常
     */
	private Integer status;
    /**
     * 创建时间
     */
	private Date createTime;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUsbKey() {
		return usbKey;
	}

	public void setUsbKey(String usbKey) {
		this.usbKey = usbKey;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public Integer getOnline() {
		return online;
	}

	public void setOnline(Integer online) {
		this.online = online;
	}

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",locale="zh",timezone = "GMT+8")
	public Date getRefreshTime() {
		return refreshTime;
	}

	public void setRefreshTime(Date refreshTime) {
		this.refreshTime = refreshTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",locale="zh",timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "Terminal{" +
			"id=" + id +
			", userId=" + userId +
			", userName=" + userName +
			", usbKey=" + usbKey +
			", name=" + name +
			", ip=" + ip +
			", mac=" + mac +
			", online=" + online +
			", refreshTime=" + refreshTime +
			", status=" + status +
			", createTime=" + createTime +
			"}";
	}
}
